package com.propic.www;

import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.StackPane;
import javafx.scene.text.Text;
import javafx.stage.Stage;

/**
 * Created by geange on 16-5-13.
 * 显示最后一张图片
 */
public class ShowEndpane {
    public static Button closeButton = new Button("关闭");


    public Stage showendpaneright(){
        Stage stage = new Stage();

        Text end = new Text("已经是最后一张");

        BorderPane borderPane = new BorderPane();
        StackPane centerpane = new StackPane();
        borderPane.setCenter(centerpane);
        centerpane.getChildren().add(end);
        StackPane bottompane = new StackPane();
        bottompane.getChildren().add(closeButton);
        borderPane.setBottom(bottompane);
        closeButton.setOnAction(e->{
            stage.close();
            Showpane.showEndnum = 0;
            Showpane.showEnd = false;
        });

        Scene scene = new Scene(borderPane, 300, 180);
        stage.setScene(scene);
        stage.setResizable(false);

        return stage;


    }

    public Stage showendpaneleft(){
        Stage stage = new Stage();
        Text end = new Text("已经是第一张");

        BorderPane borderPane = new BorderPane();
        StackPane centerpane = new StackPane();
        borderPane.setCenter(centerpane);
        centerpane.getChildren().add(end);
        StackPane bottompane = new StackPane();
        bottompane.getChildren().add(closeButton);
        borderPane.setBottom(bottompane);
        closeButton.setOnAction(e->{
            stage.close();
            Showpane.showEndnum = 0;
            Showpane.showEnd = false;
        });



        Scene scene = new Scene(borderPane, 300, 180);


        stage.setScene(scene);
        stage.setResizable(false);

        return stage;


    }
}
